// 名称拼接
export const convertToCastString = (casts) => {
  let castsjoin = "";
  for (let idx in casts) {
    castsjoin = castsjoin + casts[idx].name + " / ";
  }
  // 去掉斜线
  return castsjoin.substring(0, castsjoin.length - 2);
};
export const convertToCastInfos = (casts) => {
  let castsArray = [];
  for (let idx in casts) {
    let cast = {
      img: casts[idx].avatars ? casts[idx].avatars.large : "",
      name: casts[idx].name,
    };
    castsArray.push(cast);
  }
  return castsArray;
};
